/*
 * @Descripttion: 
 * @version: 1.0
 * @Author: xin
 * @Date: 2021-09-18 18:24:37
 * @LastEditors: serve
 * @LastEditTime: 2021-10-15 19:22:06
 */
var express = require('express');
var router = express.Router();
var play = require("../module/play")

/**获取文件上传秘钥*/
router.post('/get_qiuniu_token', async function (req, res, next) {
    play.get_qiuniu_token(req, res, next)
})

/**新增支付信息*/
router.post('/add_play_ifon_version', async function (req, res, next) {
    play.add_play_ifon_version(req, res, next)
})
/**新增支付信息*/
router.post('/add_play_ifon_people', async function (req, res, next) {
    play.add_play_ifon_people(req, res, next)
})

/**新增支付信息*/
router.post('/add_play_ifon_time', async function (req, res, next) {
    play.add_play_ifon_time(req, res, next)
})
/**查询支付配置信息*/
router.post('/get_play_ifon', async function (req, res, next) {
    play.get_play_ifon(req, res, next)
})
/**
 * 线下支付逻辑
 * 1、客户选择对应套餐
 * 2、提交支付信息
 * 3、业务员审批
 * 4、开通团队
 */
/** 提交支付订单信息*/
router.post('/sublime_payment_info', async function (req, res, next) {
    play.sublime_payment_info(req, res, next)
})
/**获取支付订单信息*/
router.post('/admin_find_payment_info', async function (req, res, next) {
    play.admin_find_payment_info(req, res, next)
})

/**获取支付订单信息 普通用户获取自己订单*/
router.post('/find_payment_info', async function (req, res, next) {
    play.find_payment_info(req, res, next)
})

/**审批订单信息*/
router.post('/update_payment_info', async function (req, res, next) {
    play.update_payment_info(req, res, next)
})

/**线上支付 支付提交订单*/
router.get('/palysuccesc', async function (req, res, next) {
    play.palysuccesc(req, res, next)
})


router.params.name = "play module"
module.exports = router;